package com.zlkj.manager.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 城市数据对象 sys_city
 * 
 * @author ruoyi
 * @date 2022-03-04
 */
public class SysCity extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** code */
    @Excel(name = "code")
    private String code;

    /** 父级编码 */
    @Excel(name = "父级编码")
    private String parentCode;

    /** 城市名称 */
    @Excel(name = "城市名称")
    private String name;

    /** 城市类型；0省，1市，2区 */
    @Excel(name = "城市类型；0省，1市，2区")
    private Long type;

    /** 拼音首字母 */
    @Excel(name = "拼音首字母")
    private String firstLetter;

    /** 城市名称的完整汉语拼音，用于拼音检索 */
    @Excel(name = "城市名称的完整汉语拼音，用于拼音检索")
    private String pinyin;

    /** 邮政编码 */
    @Excel(name = "邮政编码")
    private String zipCode;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 城市子集 */
    private List<SysCity> children = new ArrayList<SysCity>();



    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setParentCode(String parentCode) 
    {
        this.parentCode = parentCode;
    }

    public String getParentCode() 
    {
        return parentCode;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setType(Long type) 
    {
        this.type = type;
    }

    public Long getType() 
    {
        return type;
    }
    public void setFirstLetter(String firstLetter) 
    {
        this.firstLetter = firstLetter;
    }

    public String getFirstLetter() 
    {
        return firstLetter;
    }
    public void setPinyin(String pinyin) 
    {
        this.pinyin = pinyin;
    }

    public String getPinyin() 
    {
        return pinyin;
    }
    public void setZipCode(String zipCode) 
    {
        this.zipCode = zipCode;
    }

    public String getZipCode() 
    {
        return zipCode;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }


    public List<SysCity> getChildren()
    {
        return children;
    }

    public void setChildren(List<SysCity> children)
    {
        this.children = children;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("code", getCode())
            .append("parentCode", getParentCode())
            .append("name", getName())
            .append("type", getType())
            .append("firstLetter", getFirstLetter())
            .append("pinyin", getPinyin())
            .append("zipCode", getZipCode())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
